#{extends 'admin.html' /}
#{set title:'Administration : Edition d\'une Catégorie' /}
#{if flash.error}
    <h4 class="alert_error">${flash.error}</h4>
#{/if}

<article class="module width_full">
    <header>
        <h3 class="tabs_involved">Edition de la Catégorie : ${entity.name}</h3>
        <ul class="tabs">
            <li><a href="@{Categories.list}">Annuler</a></li>
        </ul>
    </header>

    <div class="entity">
        #{form @Categories.update(entity.id), id:'editCategoryForm'}
        <div class="module_content">
            <fieldset>
                <label>Nouveau nom : </label>
                <input type="text" name="entity.name" value="${entity?.name}"/>
                <span class="error">${errors.forKey('entity.name')}</span>
            </fieldset>
        </div>
        <footer>
            <div class="submit_link">
                <input type="submit" name="submit" value="Modifier !" class="alt_btn"/>
            </div>
        </footer>
    </div>
    #{/form}
</article>
